Skip to content

Support past Meetup events and iCal unescaping; run sync on PRs and refine commit condition#14

Merged
carloshvp merged 1 commit intomainfrom
codex/find-workflow-for-updating-events-y9eipg
Apr 3, 2026
Merged

Support past Meetup events and iCal unescaping; run sync on PRs and refine commit condition#14
carloshvp merged 1 commit intomainfrom
codex/find-workflow-for-updating-events-y9eipg

Conversation

@carloshvp
Copy link
Copy Markdown
Member

Motivation

  • Include recent historical events not present in the iCal feed by pulling the Meetup events/past/ page and merging results to ensure the site shows recent past events.
  • Properly unescape iCal-encoded text (line breaks, escaped commas/semicolons/backslashes) so event titles, descriptions, and locations render correctly.
  • Make the GitHub Actions workflow run on pull requests for easier review while preventing those runs from attempting to commit changes back to the repo.

Description

  • Updated the workflow .github/workflows/sync-meetup-events.yml to add a pull_request trigger for main/master and changed the commit step conditional to only commit on push, schedule, or workflow_dispatch.
  • Documented the new triggers and a new optional MEETUP_PAST_EVENTS_URL override in README.md.
  • In scripts/sync_meetup_events.py added DEFAULT_PAST_EVENTS_URL, implemented unescape_ical_text and applied it to SUMMARY, DESCRIPTION, and LOCATION fields so iCal escapes are decoded.
  • Added merge_events and enhanced fetch_events to fetch iCal events and the events/past page, merge/dedupe them (preferring meetup_url keys), log counts, and fall back to the main events page only if necessary.

Testing

  • No automated tests were added or run as part of this change.

Codex Task

@carloshvp carloshvp merged commit 864718b into main Apr 3, 2026
1 check passed
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 73bda81315

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +262 to +264
merged_events = merge_events(ical_events, past_events)
if merged_events:
return merged_events
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Preserve /events fallback when iCal source fails

In fetch_events, this early return skips the /events/ fallback whenever events/past yields any records. If the iCal request fails but events/past still responds, the sync returns only past events and drops upcoming events entirely because events_url is never queried. This is a data-loss regression during partial source outages and should still attempt the main events-page fallback when iCal data is unavailable.

Useful? React with 👍 / 👎.

Comment on lines +220 to +221
key = event.get("meetup_url") or f"{event.get('title')}|{event.get('date')}"
merged[key] = event
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Avoid URL-only dedupe key in merged event lists

merge_events deduplicates on meetup_url alone, but iCal entries without a URL are normalized to the same default URL, so distinct events overwrite each other. This causes feeds with missing URL fields to collapse to a single retained event after merge, reducing event accuracy. The merge key should fall back to a unique composite key when the URL is default or missing.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant